# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=ghostdelivery
pkgver=32.a23ed5a
pkgrel=3
pkgdesc='Python script to generate obfuscated .vbs script that delivers payload (payload dropper) with persistence and windows antivirus disabling functions.'
groups=('blackarch' 'blackarch-exploitation' 'blackarch-windows')
arch=('any')
url='https://github.com/s1egesystems/GhostDelivery'
license=('custom:unknown')
depends=('python2')
makedepends=('git')
source=("$pkgname::git+https://github.com/s1egesystems/GhostDelivery.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

prepare() {
  cd $pkgname

  mv GhostDelivery.py $pkgname

  sed -i '1i\#!/usr/bin/python2' $pkgname
}

package() {
  cd $pkgname

  install -Dm 755 $pkgname "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
}

